#include <stdio.h>

int main(){
    int arr[] = {1,2,5,6,3,2,4,6,7,4,5};
    int finish = 1;
    while (1)
    {
        finish = 1;
        for (int i = 0; i < sizeof(arr)/sizeof(int)-1; i++)
        {
           if (arr[i]>arr[i+1])
           {
               int tmp = arr[i+1];
               arr[i+1] = arr[i];
               arr[i] = tmp;
               finish = 0;
           }
        }
        if (finish)
        {
            break;
        }
        
    }
    for (int i = 0; i < sizeof(arr)/sizeof(int); i++)
    {
        printf("%d  ",arr[i]);
    }
    return 0;
}